package com.qingzhuge.common.enums;


import com.qingzhuge.common.IBaseEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author : zero.xiao
 * @description :性别分类
 * @date : 2018/6/26 0026 下午 12:27
 * @modified :
 * @since :
 */
@ApiModel("性别")
public enum ESexType implements IBaseEnum<String> {
    /**未知*/
    @ApiModelProperty("保密")
    unknown("保密"),
    /**男性*/
    @ApiModelProperty("男")
    male("男"),
    /**女性*/
    @ApiModelProperty("女")
    female("女");

    private String value;

    ESexType(String value) {
        this.value = value;
    }

    @Override
    public String value() {
        return value;
    }

    public static ESexType get(String name) {
        if (name == null) {
            return null;
        }
        ESexType[] vals = ESexType.values();
        for (ESexType e : vals) {
            boolean b = e.name().equals(name);
            if (b) {
                return ESexType.valueOf(name);
            }
        }
        return null;
    }
}
